<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			var stu2 = {
				id: 2,
				name: "王五",
				age: 19
			}



			for (var i in stu2) {
				document.write(i + "," + stu2[i] + "<br />")
			}


			with(stu2) {
				document.write(id + "," + name + "," + age);
			}
		</script>
	</body>
</html>